Feature/capr 24 create standard embed utilities - #52
Merged
shamikkarkhanis merged 3 commits intoJan 31, 2026
Conversation
Contributor
Reviewer's GuideIntroduces a shared embed utility module with standardized status-styled Discord embeds and refactors profile interaction flows to use these helpers for consistent messaging while adding tests to validate embed construction. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- In
embeds.py,STATUS_SUCCESSis defined but not used whilesuccess_embedusesSTATUS_RESOLVED, which is also green; consider either usingSTATUS_SUCCESSinsuccess_embedor removing/renaming one of the constants to avoid confusion and dead code. - Now that the profile flows use standard embeds, consider checking for any remaining plain-string response messages in this extension (and nearby ones) that should also be migrated to these helpers for consistency in UX and styling.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `embeds.py`, `STATUS_SUCCESS` is defined but not used while `success_embed` uses `STATUS_RESOLVED`, which is also green; consider either using `STATUS_SUCCESS` in `success_embed` or removing/renaming one of the constants to avoid confusion and dead code.
- Now that the profile flows use standard embeds, consider checking for any remaining plain-string response messages in this extension (and nearby ones) that should also be migrated to these helpers for consistency in UX and styling.
## Individual Comments
### Comment 1
<location> `capy_discord/utils/embeds.py:6-15` </location>
<code_context>
+import discord
+
+STATUS_ERROR = discord.Color.red()
+STATUS_SUCCESS = discord.Color.green()
+STATUS_RESOLVED = discord.Color.green()
+STATUS_INFO = discord.Color.blue()
+STATUS_WARNING = discord.Color.yellow()
+STATUS_IMPORTANT = discord.Color.gold()
+STATUS_UNMARKED = discord.Color.light_grey()
+STATUS_IGNORED = discord.Color.greyple()
+
+
+def error_embed(title: str, description: str) -> discord.Embed:
+ """Create an error status embed.
+
+ Args:
+ title: The title of the embed.
+ description: The description of the embed.
+
+ Returns:
+ discord.Embed: The created embed.
+ """
+ return discord.Embed(title=title, description=description, color=STATUS_ERROR)
+
+
+def success_embed(title: str, description: str) -> discord.Embed:
+ """Create a success status embed.
+
</code_context>
<issue_to_address>
**issue:** Align the success color constant and `success_embed` implementation
`STATUS_SUCCESS` and `STATUS_RESOLVED` are both green, but `success_embed` uses `STATUS_RESOLVED`, leaving `STATUS_SUCCESS` unused and the naming unclear. Consider either having `success_embed` use `STATUS_SUCCESS`, or removing `STATUS_SUCCESS` and renaming `STATUS_RESOLVED` if that’s the canonical success color.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
shamikkarkhanis
deleted the
feature/capr-24-create-standard-embed-utilities
branch
January 31, 2026 04:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Introduce shared embed utilities for consistent Discord message styling and adopt them in profile interactions.
New Features:
Enhancements:
Tests: